﻿<%@ Page Language="c#" CodeBehind="ListView.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.Role.ListViewPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>ListView</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
</head>
<body>
  <form runat="server">
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
      <tr>
        <td class="<%= DisplayType==0 ? "selectedTab" : "unSelectedTab" %>"><a class="Newbutton" href="ListView.aspx?Role_ID=<%= RoleID %>&DisplayType=0">角色成员</a> </td>
        <td class="<%= DisplayType==1 ? "selectedTab" : "unSelectedTab" %>"><a class="Newbutton" href="ListView.aspx?Role_ID=<%= RoleID %>&DisplayType=1">非成员</a> </td>
        <td align="right">
          <input type="button" value="角色管理" class="redbuttoncss" onclick="window.location.href = 'ORole.aspx?Role_ID=<%= RoleID %>&DisplayType=<%= (int)PageDisplayType.Edit %>';" />
          <input type="button" value="权限管理" class="redbuttoncss" onclick="window.location.href = '../AssignRule/RightListview.aspx?ObjID=<%= RoleID %>&DisplayType=<%= (int)EntityType.Role %>';" />
          <asp:Button ID="cmdDeleteStaffFromRole" runat="server" Width="74px" Text="脱离角色" Height="20px" CssClass="redbuttoncss" />
          <asp:Button ID="cmdAddToRole" runat="server" Width="73px" Text="加入角色" Height="20px" CssClass="redbuttoncss" />
        </td>
      </tr>
    </table>
    <asp:DataGrid ID="dbStaffList" runat="server" DataKeyField="Staff_ID" AllowPaging="True" Width="100%" AutoGenerateColumns="False" PageSize="15" BorderWidth="1px" BackColor="White" BorderColor="#93BEE2" BorderStyle="None" CellPadding="3" OnPageIndexChanged="DataGrid_PageChanged">
      <SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
      <AlternatingItemStyle Font-Size="X-Small" BackColor="#E8F4FF"></AlternatingItemStyle>
      <ItemStyle Font-Size="X-Small" ForeColor="#003399" BackColor="White"></ItemStyle>
      <HeaderStyle Font-Size="X-Small" ForeColor="White" BackColor="#337FB2"></HeaderStyle>
      <FooterStyle Font-Size="X-Small" HorizontalAlign="Right" ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
      <Columns>
        <asp:TemplateColumn HeaderText="ID">
          <HeaderStyle Width="20px"></HeaderStyle>
          <ItemTemplate>
            <asp:CheckBox ID="Staff_ID" runat="server" />
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:HyperLinkColumn Text="真实姓名" DataNavigateUrlField="staff_id" DataNavigateUrlFormatString="../Position/NewStaff.aspx?StaffID={0}&amp;ReturnPage=0" DataTextField="RealName" HeaderText="真实姓名">
          <HeaderStyle Width="100px"></HeaderStyle>
        </asp:HyperLinkColumn>
        <asp:BoundColumn DataField="Mobile" HeaderText="手机">
          <HeaderStyle Width="60px"></HeaderStyle>
        </asp:BoundColumn>
        <asp:BoundColumn DataField="Age" HeaderText="年龄">
          <HeaderStyle HorizontalAlign="Center" Width="30px" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:BoundColumn>
        <asp:BoundColumn DataField="SexName" HeaderText="性别">
          <HeaderStyle HorizontalAlign="Center" Width="30px" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:BoundColumn>
        <asp:BoundColumn DataField="Email" HeaderText="EMAIL">
          <HeaderStyle Width="100px" />
        </asp:BoundColumn>
        <asp:BoundColumn DataField="Position_Name" HeaderText="所在职位">
          <HeaderStyle Width="150px" />
        </asp:BoundColumn>
        <asp:BoundColumn DataField="RQ" HeaderText="注册日期">
          <HeaderStyle HorizontalAlign="Center" Width="80px" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:BoundColumn>
      </Columns>
      <PagerStyle Font-Size="X-Small" HorizontalAlign="Right" ForeColor="#003399" BackColor="#E8F4FF" Mode="NumericPages" />
    </asp:DataGrid>
  </form>
  <% if (RefreshRoleList)
     { %>
  <script type="text/javascript">
  //<!--
  window.parent.LeftFrame.location.reload();
  //-->
  </script>
  <% } %>
</body>
</html>
